home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake-6.000 / icmake-6 / icmake / exec / funputen.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-15  |  671 b   |  35 lines

  1. /*
  2. \funcref{fun\_putenv}{void fun\_chdir ()}
  3.     {}
  4.     {}
  5.     {}
  6.     {}
  7.     {funchdir.c}
  8.     {
  9.  
  10.         This function expects a string to enter in the environment on top of
  11.         the stack.
  12.  
  13.         Return register {\em reg} is set to type {\em e\_int}. The value of the
  14.         return register is set to 0 if the setting was added to the
  15.         environment.
  16.  
  17.     }
  18. */
  19.  
  20. #include "icm-exec.h"
  21. #ifdef M_UNIX      /* sco unix 3.2.4.0 conflicting header files ... */
  22.     extern int putenv(const char *);
  23. #endif
  24.  
  25. void fun_putenv ()
  26. {
  27.     register char
  28.         *env;
  29.  
  30.     env  = stack [sp].vu.i->ls.str;
  31.  
  32.     reg.type = e_int;
  33.     reg.vu.intval = putenv (xstrdup (env));
  34. }
  35.